package com.sskj.b70.p.activity;

import com.lzy.okgo.model.Response;
import com.sskj.b70.MyAppLication;
import com.sskj.b70.m.HttpConfig;
import com.sskj.b70.m.bean.AseetListBean;
import com.sskj.b70.m.bean.HttpData;
import com.sskj.b70.m.http.JsonCallBack;
import com.sskj.b70.p.base.BasePresenter;
import com.sskj.b70.v.activity.AssetManageActivity;

import java.util.List;

/**
 * ProjectName：bfex
 * DESC: (类描述)
 * Created by 李岩 on 2018/6/29 0029
 * updateName:(修改人名称)
 * updateTime:(修改时间)
 * updateDesc:(修改内容)
 */
public class AssetManagePresenter extends BasePresenter<AssetManageActivity> {
    public void requestUserAssetList() {
        httpService.assetList(MyAppLication.getID())
                .execute(new JsonCallBack<HttpData<List<AseetListBean.AseetBean>>>(this) {
                    @Override
                    protected void _onSuccess(Response<HttpData<List<AseetListBean.AseetBean>>> response) {
                        HttpData<List<AseetListBean.AseetBean>> httpListData = response.body();
                        if (httpListData.getStatus() == HttpConfig.STATUS_OK) {
                            mView.onDataSuccess(httpListData.getData());
                        }
                    }
                });
    }
}
